Controller and method for transitioning between control angles

ABSTRACT

A system includes a control module that controls a motor based on a first rotor angle and an angle determination module that generates the first rotor angle. An estimator module determines an estimated rotor angle of the motor. A transition module generates a transition signal in response to convergence of the estimator module. The angle determination module initially generates the first rotor angle based on an open loop angle. In response to the transition signal, the angle determination module switches to generating the first rotor angle based on the estimated rotor angle and an offset value. The offset value is based on a difference between the estimated rotor angle and the open loop angle at the time when the transition signal is generated.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.12/852,625, filed on Aug. 9, 2010, which claims the benefit of U.S.Provisional Application No. 61/232,633, filed on Aug. 10, 2009. Theentire disclosures of the above applications are incorporated herein byreference.

FIELD

The present disclosure relates to electric motor control systems andmethods.

BACKGROUND

The background description provided herein is for the purpose ofgenerally presenting the context of the disclosure. Work of thepresently named inventors, to the extent it is described in thisbackground section, as well as aspects of the description that may nototherwise qualify as prior art at the time of filing, are neitherexpressly nor impliedly admitted as prior art against the presentdisclosure.

Electric motors are used in a wide variety of industrial and residentialapplications including, but not limited to, heating, ventilating, andair conditioning (HVAC) systems. For example only, an electric motor maydrive a compressor in an HVAC system. One or more additional electricmotors may also be implemented in the HVAC system. For example only, theHVAC system may include another electric motor that drives a fanassociated with a condenser. Another electric motor may be included inthe HVAC system to drive a fan associated with an evaporator.

Power factor is an indicator of the relationship between current andvoltage in a circuit, or how effectively a circuit uses real powercompared to storing and returning energy to the power source. Powerfactor may be expressed as a value between zero and one. The circuit'suse of actual real power divided by the total volt amps drawn by thecircuit may increase as the power factor approaches one. In variousimplementations, a power factor correction (PFC) system may beimplemented. PFC systems generally operate to increase a circuit's powerfactor toward one, thereby increasing the circuit's use of real power ascompared with the amount of reactive power the circuit stores andreturns to the source.

SUMMARY

A system includes a pulse-width modulation (PWM) module, a subtractionmodule, an error reducing module, and a summing module. The PWM modulecontrols switching of an inverter that powers a motor. The PWM modulecontrols the switching based on a first angle in a first mode and asecond angle in a second mode. The subtraction module determines adifference between the first and second angles. The error reducingmodule (i) stores the difference when a transition from the first modeto the second mode is commanded and (ii) decreases a magnitude of thestored difference to zero. The summing module calculates a sum of thestored difference and the second angle. The PWM module controls theswitching based on the sum in the second mode.

In other features, the system further comprises a commanded anglegeneration module. The commanded angle generation module generates thefirst angle based on a commanded speed.

In still other features, the first angle is generated by integrating thecommanded speed.

In further features, the system further comprises a rate limitingmodule. The rate limiting module generates the commanded speed by ratelimiting a requested speed.

In still further features, the system further comprises an estimatormodule. The estimator module determines the second angle based onmeasured parameters of the motor. The measured parameters include atleast one of measured currents and measured voltages.

In other features, the estimator module determines an estimated speed.The PWM module controls the switching based on the estimated speed afterthe transition from the first mode to the second mode.

In still other features, the error reducing module decreases themagnitude by a predetermined amount at periodic intervals.

In further features, the system further comprises a transition module.The transition module commands the transition from the first mode to thesecond mode when an estimated speed of the motor is greater than apredetermined speed.

In still further features, the system further comprises a transitionmodule. The transition module commands the transition from the firstmode to the second mode when the motor has been running for longer thana predetermined period.

A method includes: controlling switching of an inverter that powers amotor based on a first angle in a first mode and a second angle in asecond mode; determining a difference between the first and secondangles; storing the difference when a transition from the first mode tothe second mode is commanded; decreasing a magnitude of the storeddifference to zero; calculating a sum of the stored difference and thesecond angle; and controlling the switching based on the sum in thesecond mode.

In other features, the method further includes generating the firstangle based on a commanded speed.

In still other features, the method further includes generating thefirst angle by integrating the commanded speed.

In further features, the method further includes generating thecommanded speed by rate limiting a requested speed.

In still further features, the method further includes determining thesecond angle based on measured parameters of the motor. The measuredparameters include at least one of measured currents and measuredvoltages.

In other features, the method further includes determining an estimatedspeed and controlling the switching based on the estimated speed afterthe transition from the first mode to the second mode.

In still other features, the method further includes decreasing themagnitude by a predetermined amount at periodic intervals.

In further features, the method further includes commanding thetransition from the first mode to the second mode when an estimatedspeed of the motor is greater than a predetermined speed.

In still further features, the method further includes commanding thetransition from the first mode to the second mode when the motor hasbeen running for longer than a predetermined period.

A system includes a control module, an angle determination module, and areducing module. The control module controls a motor based on a firstrotor angle in a first mode and controls the motor based on a secondrotor angle in a second mode. The angle determination module (i)determines the second rotor angle based on a sum of a stored value and athird rotor angle and (ii) after the second mode is selected, sets thestored value to a difference between the first rotor angle and the thirdrotor angle. The reducing module reduces a magnitude of the stored valueto zero over a non-zero period after the second mode is selected.

Further areas of applicability of the present disclosure will becomeapparent from the detailed description provided hereinafter. It shouldbe understood that the detailed description and specific examples areintended for purposes of illustration only and are not intended to limitthe scope of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure will become more fully understood from thedetailed description and the accompanying drawings, wherein:

FIG. 1 is a functional block diagram of an exemplary refrigerationsystem;

FIG. 2 is a functional block diagram of an exemplary drive controllerand an exemplary compressor;

FIGS. 3 a-3 c are simplified schematics of exemplary power factorcorrection (PFC) modules;

FIGS. 4 a-4 c are simplified schematics of exemplary inverter powermodules and exemplary motors;

FIG. 5 is a functional block diagram of a motor control module accordingto the present disclosure;

FIG. 6 is a functional block diagram of an angle determination moduleaccording to the present disclosure;

FIG. 7 illustrates a transition from open loop operation to closed loopoperation according to the present disclosure; and

FIG. 8 illustrates a method for transitioning from open loop operationto closed loop operation according to the present disclosure.

DETAILED DESCRIPTION

The following description is merely illustrative in nature and is in noway intended to limit the disclosure, its application, or uses. Forpurposes of clarity, the same reference numbers will be used in thedrawings to identify similar elements. As used herein, the phrase atleast one of A, B, and C should be construed to mean a logical (A or Bor C), using a non-exclusive logical or. It should be understood thatsteps within a method may be executed in different order withoutaltering the principles of the present disclosure.

As used herein, the term module may refer to, be part of, or include anApplication Specific Integrated Circuit (ASIC); an electronic circuit; acombinational logic circuit; a field programmable gate array (FPGA); aprocessor (shared, dedicated, or group) that executes code; othersuitable components that provide the described functionality; or acombination of some or all of the above, such as in a system-on-chip.The term module may include memory (shared, dedicated, or group) thatstores code executed by the processor.

The term code, as used above, may include software, firmware, and/ormicrocode, and may refer to programs, routines, functions, classes,and/or objects. The term shared, as used above, means that some or allcode from multiple modules may be executed using a single (shared)processor. In addition, some or all code from multiple modules may bestored by a single (shared) memory. The term group, as used above, meansthat some or all code from a single module may be executed using a groupof processors. In addition, some or all code from a single module may bestored using a group of memories.

The apparatuses and methods described herein may be implemented by oneor more computer programs executed by one or more processors. Thecomputer programs include processor-executable instructions that arestored on a non-transitory tangible computer readable medium. Thecomputer programs may also include stored data. Non-limiting examples ofthe non-transitory tangible computer readable medium are nonvolatilememory, magnetic storage, and optical storage.

Referring now to FIG. 1, a functional block diagram of a refrigerationsystem 100 is presented. The refrigeration system 100 may include acompressor 102, a condenser 104, an expansion valve 106, and anevaporator 108. According to the principles of the present disclosure,the refrigeration system 100 may include additional and/or alternativecomponents. In addition, the present disclosure is applicable to othersuitable types of refrigeration systems including, but not limited to,heating, ventilating, and air conditioning (HVAC), heat pump,refrigeration, and chiller systems.

The compressor 102 receives refrigerant in vapor form and compresses therefrigerant. The compressor 102 provides pressurized refrigerant invapor form to the condenser 104. The compressor 102 includes an electricmotor that drives a pump. For example only, the pump of the compressor102 may include a scroll compressor and/or a reciprocating compressor.

All or a portion of the pressurized refrigerant is converted into liquidform within the condenser 104. The condenser 104 transfers heat awayfrom the refrigerant, thereby cooling the refrigerant. When therefrigerant vapor is cooled to a temperature that is less than asaturation temperature, the refrigerant transforms into a liquid (orliquefied) refrigerant. The condenser 104 may include an electric fanthat increases the rate of heat transfer away from the refrigerant.

The condenser 104 provides the refrigerant to the evaporator 108 via theexpansion valve 106. The expansion valve 106 controls the flow rate atwhich the refrigerant is supplied to the evaporator 108. The expansionvalve 106 may include a thermostatic expansion valve or may becontrolled electronically by, for example, a system controller 130. Apressure drop caused by the expansion valve 106 may cause a portion ofthe liquefied refrigerant to transform back into the vapor form. In thismanner, the evaporator 108 may receive a mixture of refrigerant vaporand liquefied refrigerant.

The refrigerant absorbs heat in the evaporator 108. Liquid refrigeranttransitions into vapor form when warmed to a temperature that is greaterthan the saturation temperature of the refrigerant. The evaporator 108may include an electric fan that increases the rate of heat transfer tothe refrigerant.

A utility 120 provides power to the refrigeration system 100. Forexample only, the utility 120 may provide single-phase alternatingcurrent (AC) power at approximately 230 Volts (V) root mean squared(RMS) or at another suitable voltage. In various implementations, theutility 120 may provide three-phase power at approximately 400 Volts RMSor 480 Volts RMS at a line frequency of, for example, 50 or 60 Hz. Theutility 120 may provide the AC power to the system controller 130 via anAC line. The AC power may also be provided to a drive controller 132 viathe AC line.

The system controller 130 controls the refrigeration system 100. Forexample only, the system controller 130 may control the refrigerationsystem 100 based on user inputs and/or parameters measured by varioussensors (not shown). The sensors may include pressure sensors,temperature sensors, current sensors, voltage sensors, etc. The sensorsmay also include feedback information from the drive control, such asmotor currents or torque, over a serial data bus or other suitable databuses.

A user interface 134 provides user inputs to the system controller 130.The user interface 134 may additionally or alternatively provide theuser inputs to the drive controller 132. The user inputs may include,for example, a desired temperature, requests regarding operation of afan (e.g., the evaporator fan), and/or other suitable inputs. The systemcontroller 130 may control operation of the fans of the condenser 104,the evaporator 108, and/or the expansion valve 106.

The drive controller 132 may control the compressor 102 based oncommands from the system controller 130. For example only, the systemcontroller 130 may instruct the drive controller 132 to operate thecompressor motor at a certain speed. In various implementations, thedrive controller 132 may also control the condenser fan.

Referring now to FIG. 2, a functional block diagram of the drivecontroller 132 and the compressor 102 is presented. An electromagneticinterference (EMI) filter 202 reduces EMI that might otherwise beinjected back onto the AC line by the drive controller 132. The EMIfilter 202 may also filter EMI carried on the AC line.

A power factor correction (PFC) module 204 receives AC power from the ACline as filtered by the EMI filter 202. The PFC module 204 (described inmore detail with reference to FIGS. 3 a, 3 b, and 3 c) rectifies the ACpower, thereby converting the AC input power into direct current (DC)power. The generated DC power is provided at positive and negativeterminals of the PFC module 204. The PFC module 204 also selectivelyprovides power factor correction between the input AC power and thegenerated DC power.

The PFC module 204 selectively boosts the AC power to a DC voltage thatis greater than a peak voltage of the AC power. For example only, thePFC module 204 may operate in a passive mode, where the DC voltagegenerated is less than a peak voltage of the AC power. The PFC module204 may also operate in an active mode, where the DC voltage generatedis greater than the peak voltage of the AC power. A DC voltage that isgreater than the peak voltage of the AC power may be referred to as aboosted DC voltage.

AC power having an RMS voltage of 230 V has a peak voltage ofapproximately 325 V (230 V multiplied by the square root of 2). Forexample only, when operating from AC power having an RMS voltage of 230V, the PFC module 204 may generate boosted DC voltages betweenapproximately 350 V and approximately 410 V. For example only, the lowerlimit of 350 V may be imposed to avoid unstable operating regimes of thePFC module 204. The limits may vary, such as with the actual AC inputvoltage value. In various implementations, the PFC module 204 may beable to achieve higher boosted DC voltages than 410 V. However, theupper limit may be imposed to improve long-term reliability ofcomponents that would experience greater stress at higher voltages, suchas components in a DC filter 206. In various implementations, the upperand/or lower limits may be varied.

The DC filter 206 filters the DC power generated by the PFC module 204.The DC filter 206 minimizes ripple voltage present in the DC power thatresults from the conversion of AC power to DC power. In variousimplementations, the DC filter 206 may include one or more series orparallel filter capacitors connected between the positive and negativeterminals of the PFC module 204. In such implementations, the positiveand negative terminals of the PFC module 204 may be connected directlyto positive and negative terminals of an inverter power module 208.

The inverter power module 208 (described in more detail with referenceto FIGS. 4 a, 4 b, and 4 c) converts the DC power, as filtered by the DCfilter 206, into AC power that is provided to the compressor motor. Forexample only, the inverter power module 208 may convert the DC powerinto three-phase AC power and provide the phases of the AC power tothree respective windings of the motor of the compressor 102. In otherimplementations, the inverter power module 208 may convert the DC powerinto more or fewer phases of power.

A DC-DC power supply 220 may also receive the filtered DC power. TheDC-DC power supply 220 converts the DC power into one or more DCvoltages that are suitable for various components and functions. Forexample only, the DC-DC power supply 220 may reduce the voltage of theDC power to a first DC voltage that is suitable for powering digitallogic and a second DC voltage that is suitable for controlling switcheswithin the PFC module 204. For example only, the second DC voltage maybe selectively applied to gate terminals of the switches. In variousimplementations, DC power may be provided by another DC power source(not shown)—for example, a DC voltage derived via a transformer from themain 230 VAC input.

In various implementations, the first DC voltage may be approximately3.3 V and the second DC voltage may be approximately 15 V. In variousimplementations, the DC-DC power supply 220 may also generate a third DCvoltage. For example only, the third DC voltage may be approximately 1.2V. The third DC voltage may be derived from the first DC voltage using avoltage regulator. For example only, the third DC voltage may be usedfor core digital logic and the first DC voltage may be used forinput/output circuitry of a PFC control module 250 and a motor controlmodule 260.

The PFC control module 250 controls the PFC module 204, and the motorcontrol module 260 controls the inverter power module 208. In variousimplementations, the PFC control module 250 controls switching of theswitches within the PFC module 204, and the motor control module 260controls switching of switches within the inverter power module 208. ThePFC module 204 may be implemented with 1, 2, 3, or more phases.

A supervisor control module 270 may communicate with the systemcontroller 130 via a communications module 272. The communicationsmodule 272 may include an input/output port and other suitablecomponents to serve as an interface between the system controller 130and the supervisor control module 270. The communications module 272 mayimplement wired and/or wireless protocols.

The supervisor control module 270 provides various commands to the PFCcontrol module 250 and the motor control module 260. For example, thesupervisor control module 270 may provide a commanded speed to the motorcontrol module 260. The commanded speed corresponds to a desiredrotational speed of the motor of the compressor 102.

In various implementations, the commanded compressor speed may beprovided to the supervisor control module 270 by the system controller130. In various implementations, the supervisor control module 270 maydetermine or adjust the commanded compressor speed based on inputsprovided via the communications module 272 and/or parameters measured byvarious sensors (i.e., sensor inputs). The supervisor control module 270may also adjust the commanded compressor speed based on feedback fromthe PFC control module 250 and/or the motor control module 260.

The supervisor control module 270 may also provide other commands to thePFC control module 250 and/or the motor control module 260. For example,based on the commanded speed, the supervisor control module 270 maycommand the PFC control module 250 to produce a commanded bus voltage.The supervisor control module 270 may adjust the commanded bus voltagebased on additional inputs, such as operating parameters of the inverterpower module 208 and the measured voltage of the incoming AC line.

The supervisor control module 270 may diagnose faults in various systemsof the drive controller 132. For example only, the supervisor controlmodule 270 may receive fault information from the PFC control module 250and/or the motor control module 260. The supervisor control module 270may also receive fault information via the communications module 272.The supervisor control module 270 may manage reporting and clearing offaults between the drive controller 132 and the system controller 130.

Responsive to the fault information, the supervisor control module 270may instruct the PFC control module 250 and/or the motor control module260 to enter a fault mode. For example only, in the fault mode, the PFCcontrol module 250 may halt switching of the switches of the PFC module204, while the motor control module 260 may halt switching of theswitches of the inverter power module 208. In addition, the motorcontrol module 260 may directly provide fault information to the PFCcontrol module 250. In this way, the PFC control module 250 can respondto a fault identified by the motor control module 260 even if thesupervisor control module 270 is not operating correctly and vice versa.

The PFC control module 250 may control switches in the PFC module 204using pulse width modulation (PWM). More specifically, the PFC controlmodule 250 may generate PWM signals that are applied to the switches ofthe PFC module 204. The duty cycle of the PWM signals is varied toproduce desired currents in the switches of the PFC module 204. Thedesired currents are calculated based on an error between the measuredDC bus voltage and a desired DC bus voltage. In other words, the desiredcurrents are calculated in order to achieve the desired DC bus voltage.The desired currents may also be based on achieving desired power factorcorrection parameters, such as the shapes of current waveforms in thePFC module 204. The PWM signals generated by the PFC control module 250may be referred to as PFC PWM signals.

The motor control module 260 may control switches in the inverter powermodule 208 using PWM in order to achieve the commanded compressor speed.The PWM signals generated by the motor control module 260 may bereferred to as inverter PWM signals. The duty cycle of the inverter PWMsignals controls the current through the windings of the motor (i.e.,motor currents) of the compressor 102. The motor currents control motortorque, and the motor control module 260 may control the motor torque toachieve the commanded compressor speed.

In addition to sharing fault information, the PFC control module 250 andthe motor control module 260 may also share data. For example only, thePFC control module 250 may receive data from the motor control module260 such as load, motor currents, estimated motor torque, invertertemperature, duty cycle of the inverter PWM signals, and other suitableparameters. The PFC control module 250 may also receive data from themotor control module 260, such as the measured DC bus voltage. The motorcontrol module 260 may receive data from the PFC control module 250 suchas AC line voltage, current(s) through the PFC module 204, estimated ACpower, PFC temperature, commanded bus voltage, and other suitableparameters.

In various implementations, some or all of the PFC control module 250,the motor control module 260, and the supervisor control module 270 maybe implemented on an integrated circuit (IC) 280. For example only, theIC 280 may include a digital signal processor (DSP), a fieldprogrammable gate array (FPGA), a microprocessor, etc. In variousimplementations, additional components may be included in the IC 280.Additionally, various functions shown inside the IC 280 in FIG. 2 may beimplemented external to the IC 280, such as in a second IC or indiscrete circuitry. For example only, the supervisor control module 270may be integrated with the motor control module 260.

FIG. 3 a is a schematic of an example implementation of the PFC module204. The PFC module 204 receives AC power via first and second AC inputterminals 302 and 304. The AC power may be, for example, the AC poweroutput by the EMI filter 202. In various implementations, the signals atthe first and second AC input terminals 302 and 304 may both betime-varying with respect to an earth ground. The PFC module 204 outputsDC power to the DC filter 206 and the inverter power module 208 via apositive DC terminal 306 and a negative DC terminal 308.

An anode of a first rectifier diode 310 is connected to the second ACinput terminal 304, and a cathode of the first rectifier diode 310 isconnected to the positive DC terminal 306. An anode of a secondrectifier diode 312 is connected to the negative DC terminal 308, and acathode of the second rectifier diode 312 is connected to the second ACinput terminal 304. Each of the rectifier diodes 310 and 312 may beimplemented as one or more individual series or parallel diodes.

A switch block 320 is connected between the positive and negative DCterminals 306 and 308. The switch block 320 includes a first PFC leg 330that includes first and second switches 332 and 334. The switches 332and 334 each include a first terminal, a second terminal, and a controlterminal. In various implementations, each of the switches 332 and 334may be implemented as an insulated gate bipolar transistor (IGBT). Insuch implementations, the first, second, and control terminals maycorrespond to collector, emitter, and gate terminals, respectively.

The first terminal of the first switch 332 is connected to the positiveDC terminal 306. The second terminal of the first switch 332 isconnected to the first terminal of the second switch 334. The secondterminal of the second switch 334 may be connected to the negative DCterminal 308. In various implementations, the second terminal of thesecond switch 334 may be connected to the negative DC terminal 308 via ashunt resistor 380 to enable measuring current flowing through the firstPFC leg 330.

The control terminals of the switches 332 and 334 receive generallycomplementary PFC PWM signals from the PFC control module 250. In otherwords, the PFC PWM signal provided to the first switch 332 is oppositein polarity to the PFC PWM signal provided to the second switch 334.Short circuit current may flow when the turning on of one of theswitches 332 and 334 overlaps with the turning off of the other of theswitches 332 and 334. Therefore, both the switches 332 and 334 may beturned off during a deadtime before either one of the switches 332 and334 is turned on. Therefore, generally complementary means that twosignals are opposite for most of their periods. However, aroundtransitions, both signals may be low or high for some overlap period.

The first PFC leg 330 may also include first and second diodes 336 and338 connected anti-parallel to the switches 332 and 334, respectively.In other words, an anode of the first diode 336 is connected to thesecond terminal of the first switch 332, and a cathode of the firstdiode 336 is connected to the first terminal of the first switch 332. Ananode of the second diode 338 is connected to the second terminal of thesecond switch 334, and a cathode of the second diode 338 is connected tothe first terminal of the second switch 334.

The switch block 320 may include one or more additional PFC legs. Invarious implementations, the switch block 320 may include one additionalPFC leg. As shown in FIG. 3 a, the switch block 320 includes second andthird PFC legs 350 and 360. The number of PFC legs included in theswitch block 320 may be chosen based on performance and cost. Forexample only, the magnitude of ripple (voltage and current) in the DCoutput of the PFC module 204 may decrease as the number of PFC legsincreases. In addition, the amount of ripple current in the AC linecurrent may decrease as the number of PFC legs increase. However, partscosts and implementation complexity may increase as the number of PFClegs increases.

The second and third PFC legs 350 and 360 of the switch block 320 may besimilar to the first PFC leg 330. For example only, the second and thirdPFC legs 350 and 360 may each include respective components for theswitches 332 and 334, the diodes 336 and 338, and respective shuntresisters connected in the same manner as the first PFC leg 330.

The PFC PWM signals provided to the switches of the additional PFC legsmay also be complementary in nature. The PFC PWM signals provided to theadditional PFC legs may be phase shifted from each other and from thePFC PWM signals provided to the first PFC leg 330. For example only, thephase shift of the PFC PWM signals may be determined by dividing 360degrees (°) by the number of PFC legs. For example, when the switchblock 320 includes three PFC legs, the PFC PWM signals may be phaseshifted from each other by 120° (or 180° for two phases, or 90° for fourphases, etc.). Phase shifting the PFC PWM signals may cancel ripple inthe AC line current as well as the DC output.

The PFC module 204 includes a first inductor 370. The first inductor 370is connected between the first AC input terminal 302 and the secondterminal of the first switch 332. Additional inductors may connect thefirst AC input terminal 302 to additional PFC legs. For example only,FIG. 3 a shows a second inductor 372 and a third inductor 374 connectingthe first AC input terminal 302 to the second and third PFC legs 350 and360, respectively.

A voltage may be measured across the shunt resistor 380 to determinecurrent through the first PFC leg 330 according to Ohm's law. Anamplifier (not shown), such as an operational amplifier, may amplify thevoltage across the shunt resistor 380. The amplified voltage may bedigitized, buffered, and/or filtered to determine the current throughthe first PFC leg 330. Current through other PFC legs may be determinedusing respective shunt resistors.

Additionally or alternatively, a resistor 382 may be connected in serieswith the negative DC terminal 308, as shown in FIG. 3 b. Current throughthe resistor 382 may therefore indicate a total current output from thePFC module 204. Current through each of the PFC legs 330, 350, and 360may be inferred from the total current based on the known phase timingof the current through the PFC legs 330, 350, and 360.

Any method of measuring or sensing current through any or all of the PFClegs 330, 350, 360 may be used. For example, in various implementations,the current through the first PFC leg 330 may be measured using acurrent sensor 387 (as shown in FIG. 3 c). For example only, the currentsensor 387 may be implemented in series with the first inductor 370. Invarious implementations, the current sensor 387 may include aHall-effect sensor that measures the current through the first PFC leg330 based on magnetic flux around the first inductor 370. Currentthrough the PFC legs 350 and 360 may also be measured using associatedcurrent sensors 388 and 389, respectively.

The PFC module 204 may also include first and second bypass diodes 390and 392. An anode of the first bypass diode 390 is connected to thefirst AC input terminal 302, and a cathode of the first bypass diode 390is connected to the positive DC terminal 306. An anode of the secondbypass diode 392 is connected to the negative DC terminal 308, and acathode of the second bypass diode 392 is connected to the first ACinput terminal 302.

The bypass diodes 390 and 392 may be power diodes, which may be designedto operate at low frequencies, such as, for example, frequencies lessthan approximately 100 Hz or approximately 200 Hz. Resistance of thebypass diodes 390 and 392 may be less than resistance of the inductors370, 372, and 374. Therefore, when the switches 332 and 334 within theswitch block 320 are not being switched, current may flow through thebypass diodes 390 and 392 instead of the diodes 336 and 338.

When the PFC module 204 is operating to create a boosted DC voltage, theboosted DC voltage will be greater than a peak voltage on the AC line.The bypass diodes 390 and 392 will therefore not be forward biased andwill remain inactive. The bypass diodes 390 and 392 may providelightning strike protection and power surge protection.

In various implementations, the bypass diodes 390 and 392 may beimplemented with the rectifier diodes 310 and 312 in a single package.For example only, Vishay model number 26MT or 36MT or InternationalRectifier, model number 26 MB or 36 MB may be used as the bypass diodes390 and 392 and the rectifier diodes 310 and 312. The rectifier diodes310 and 312 carry current whether the PFC module 204 is generating aboosted DC voltage or not. Therefore, in various implementations, eachof the rectifier diodes 310 and 312 may be implemented as two physicaldiodes connected in parallel. Current sensors may be used to measure PFCphase currents in series with the inductors 370, 372, and 374.

Referring now to FIG. 4 a, a simplified schematic of a motor 400 and anexample implementation of the inverter power module 208 is presented.The motor 400 is a component of the compressor 102 of FIG. 2. However,the principles of FIGS. 4 a-4 c may apply to other motors, including amotor of the condenser 104. The inverter power module 208 includes aswitch block 402. In various implementations, the switch block 402 andthe switch block 320 of the PFC module 204 may be implemented using asimilar part. For example only, in FIG. 4 a, a first inverter leg 410includes first and second switches 420 and 422 and first and seconddiodes 424 and 426, which are arranged similarly to the switches 332 and334 and the diodes 336 and 338 of FIG. 3 a.

The switch block 402 receives the filtered DC voltage from the DC filter206 via a positive DC terminal 404 and a negative DC terminal 406. Thefirst terminal of the first switch 420 may be connected to the positiveDC terminal 404, while the second terminal of the second switch 422 maybe connected to the negative DC terminal 406. The control terminals ofthe switches 420 and 422 receive generally complementary inverter PWMsignals from the motor control module 260.

The switch block 402 may include one or more additional inverter legs.In various implementations, the switch block 402 may include oneinverter leg for each phase or winding of the motor 400. For exampleonly, the switch block 402 may include second and third inverter legs430 and 440, as shown in FIG. 4 a. The inverter legs 410, 430, and 440may provide current to windings 450, 452, and 454 of the motor 400,respectively. The windings 454, 452, and 450 may be referred to aswindings a, b, and c, respectively. Voltage applied to the windings 454,452, and 450 may be referred to as Va, Vb, and Vc, respectively. Currentthrough the windings 454, 452, and 450 may be referred to as 1 a, 1 b,and 1 c, respectively.

For example only, first ends of the windings 450, 452, and 454 may beconnected to a common node. Second ends of the windings 450, 452, and454 may be connected to the second terminal of the first switch 420 ofthe inverter legs 410, 430, and 440, respectively.

The inverter power module 208 may also include a shunt resistor 460 thatis associated with the first inverter leg 410. The shunt resistor 460may be connected between the second terminal of the second switch 422and the negative DC terminal 406. In various implementations, respectiveshunt resistors may be located between each of the inverter legs 430 and440 and the negative DC terminal 406. For example only, current throughthe first winding 450 of the motor 400 may be determined based on thevoltage across the shunt resistor 460 of the first inverter leg 410. Invarious implementations, the shunt resistor of one of the inverter legs410, 430, or 440 may be omitted. In such implementations, current may beinferred based on the measurements of the remaining shunt resistors.

Additionally or alternatively, a resistor 462 may be connected in serieswith the negative DC terminal 406, as shown in FIG. 4 b. Current throughthe resistor 462 may therefore indicate a total current consumed by theinverter power module 208. Current through each of the inverter legs410, 430, and 440 may be inferred from the total current based on theknown phase timing of the current through the inverter legs 410, 430,and 440. Further discussion of determining currents in an inverter canbe found in commonly assigned U.S. Pat. No. 7,193,388, issued Mar. 20,2007, which is incorporated by reference herein in its entirety.

Any method of measuring or sensing current through any or all of theinverter legs 410, 430, and 440 may be used. For example, in variousimplementations, the current through the first inverter leg 410 may bemeasured using a current sensor 487 (shown in FIG. 4 c). For exampleonly, the current sensor 487 may be implemented between the firstinverter leg 410 and the first winding 450. Current through the inverterlegs 430 and 440 may also be measured using associated current sensors488 and 489, respectively. In various implementations, current sensorsmay be associated with two of the inverter legs 410, 430, and 440. Thecurrent through the other one of the inverter legs 410, 430, and 440 maybe determined based on an assumption that the current in the motorwindings sums to zero.

Referring now to FIG. 5, an example implementation of the motor controlmodule 260 of FIG. 2 is shown. The motor control module 260 controlsswitches within the inverter power module 208 to control voltagesapplied to the windings 454, 452, 450 (hereinafter, “windings_(a-c)”) ofthe motor 400. This may also be referred to as controlling the inverterpower module 208 or as controlling the motor 400.

For example, when the motor 400 includes a three-phase motor, the motorcontrol module 260 may apply voltages V_(a-c) to windings_(a-c),respectively. Voltages V_(a-c) may collectively be referred to as outputvoltages. Currents I_(a-c) are generated in the windings_(a-c),respectively, when voltages V_(a), are applied to the windings_(a-c).Currents I_(a-c) may collectively be referred to as winding currents.Currents in the windings_(a-c) produce magnetic flux about thewindings_(a-c), and vice versa. The motor control module 260 generatesthe output voltages to control the winding currents and/or to controlmagnetic flux.

The motor 400 includes a rotor (not shown) that rotates in response tothe winding currents. The motor control module 260 controls theamplitude, duty cycle, and/or frequency of the output voltages tocontrol the torque and speed of the rotor. The motor control module 260may control the output voltages based on a commanded motor speed, whichrepresents a desired rotational speed of the rotor.

The motor control module 260 may implement field oriented control of themotor 400. Accordingly, the motor control module 260 may map motordriving variables onto various frames of reference. Motor drivingvariables may include requested current/voltage values used to controlthe motor 400 as well as measured currents/voltages. For example, motordriving variables may include measured currents I_(a-c) through thewindings_(a-c) and voltage requests used by the motor control module 260to apply voltages V_(a-c) to the windings_(a-c).

The motor control module 260 may map motor driving variables in an abcframe of reference (FoR), an αβ FoR, and a qdr FoR. The abc FoR mayrepresent, for example, a three-phase stator frame based on thewindings_(a-c). Each of the measured currents I_(a-c) may be mapped ontorespective axes a, b, and c of the abc FoR. Additionally, the motorcontrol module 260 may map requested voltages corresponding to voltagesV_(a-c) in the abc FoR.

The αβ FoR includes stationary, stator-based x and y coordinates ontowhich the motor driving variables are projected. The qdr FoR is arotating FoR that corresponds to the rotor and rotates in sync with therotor. Accordingly, the qdr FoR is based on an angle of the rotor.

The motor control module 260 may transform motor driving variables fromone FoR to another FoR. For example, the motor control module 260 maytransform currents represented in the abc FoR into currents representedin the αβ FoR and vice versa. The motor control module 260 may transformmotor driving variables from the abc FoR to the αβ FoR using a numericaltransformation. The motor control module 260 may transform motor drivingvariables from the αβ FoR to the qdr FoR based on the angle of therotor.

The motor control module 260 controls the inverter power module 208based on the commanded speed from the supervisor control module 270 ofFIG. 2. In various implementations, a filter module 501 may filter thecommanded speed from the supervisor control module 270 of FIG. 2. Inthese implementations, the output of the filter module 501 is referredto below as the commanded speed ω_(v).

In open loop mode, the actual speed of the rotor will generally followthe commanded speed ω_(v), assuming that the commanded speed ω_(v) doesnot change too quickly. As a result, the coefficients of the low-passfilter of the filter module 501 may be chosen so that the rotoracceleration can keep up with changes in the commanded speed ω_(v)output from the filter module 501. Otherwise, rotor synchronization maybe lost. In various implementations, the filter module 501 may implementa ramp function, which updates the commanded speed ω_(v) by up to amaximum increment during each predetermined interval of time.

The motor control module 260 may control the motor 400 based on acommanded FoR (e.g., a qdv FoR) when operating in open loop mode. Theqdv FoR is associated with the commanded speed ω_(v) of the rotor and acommanded angle (θ_(v)) of the rotor. A commanded angle generationmodule 502 may determine the commanded angle θ_(v), such as byintegrating the commanded speed ω_(v).

The motor control module 260 may operate in various modes, such as openloop mode or a closed loop mode. For example only, the motor controlmodule 260 may operate in open loop mode when starting the motor 400 andlater transition to operating in closed loop mode. When operating inopen loop mode, the rotor will tend to synchronize with the commandedspeed ω_(v), especially when the motor control module 260 is operatingthe rotor at slower speeds. However, the actual rotor angle may differfrom the commanded angle θ_(v) because of a load applied to the motor400. For example, a change in load while operating in open loop mode maychange a phase difference between the commanded angle θ_(v) and theactual rotor angle.

A transition module 503 determines when to transition the motor controlmodule 260 from open loop mode to closed loop mode. For example only,the transition module 503 may determine when to transition based on atleast one of the commanded speed ω_(v), an operating time of the motor400, a commanded acceleration of the rotor, and/or feedback from anestimator module 504.

For example, the transition module 503 may predict the speed of therotor based on the commanded acceleration and/or the operating time. Thetransition module 503 may transition from open to closed loop when thepredicted speed is greater than a speed threshold. In variousimplementations, the transition module 503 may transition from open loopmode to closed loop mode when an elapsed time from when the motor 400was started exceeds a predetermined period.

The estimator module 504 estimates the speed (ω_(est)) and angle(θ_(est)) of the rotor. The estimator module 504 may determine theestimated speed ω_(est) based on the estimated angle θ_(est). Forexample, the estimator module 504 may differentiate and filter theestimated angle θ_(est) over a period of time to determine the estimatedspeed ω_(est). The transition module 503 may transition from open toclosed loop mode when the estimator module 504 has achieved stableestimates of the estimated angle θ_(est) and the estimated speedω_(est). In various implementations, the transition module 503 maytransition from open loop mode to closed loop mode when convergence inthe estimator module 504 has occurred, which may be indicated by, forexample, flux estimates.

Alternatively, the transition module 503 may transition from open loopmode to closed loop mode when the commanded speed ω_(v) is greater thanthe speed threshold. Alternatively or additionally, the transitionmodule 503 may initiate a transition when the estimated speed ω_(est) ofthe rotor is greater than a predetermined speed. Other factors affectingwhen to perform the transition may include a load on the motor 400 andmotor driving variables.

The estimator module 504 may determine the estimated angle θ_(est) basedon various motor driving variables. For example, the motor drivingvariables may include V_(a-c) to be applied to the windings_(a-c) andI_(a-c) measured in the windings_(a-c). Additionally, the estimatormodule 504 may determine the estimated angle θ_(est) based on thecommanded speed ω_(v). The estimator module 504 may implement a stateobserver (e.g., a Luenberger observer) to determine the estimated angleθ_(est) and the estimated speed ω_(est) based on the motor drivingvariables. Further description of sensorless control systems and methodscan be found in U.S. Pat. Nos. 6,756,757, issued Jun. 29, 2004,7,208,895, issued Apr. 24, 2007, 7,342,379, issued Mar. 11, 2008, and7,375,485, issued May 20, 2008, which are incorporated herein byreference in their entirety.

A current determination module 506 may measure the currents I_(a-c) ofthe windings_(a-c) (hereinafter “measured currents”). The estimatormodule 504 may use the measured currents to estimate θ_(est) andω_(est).

An angle/speed determination module 508 generates an output angle θ_(r)and an output speed ω_(r) based on the currently enabled mode, such asopen loop mode or closed loop mode. The angle/speed determination module508 may set the output angle θ_(r) equal to the commanded angle θ_(v)when operating in open loop mode and may set the output angle θ_(r)equal to the estimated angle θ_(est) when operating in closed loop mode.

When the transition module 503 instructs a transition from open loopmode to closed loop mode, the angle/speed determination module 508gradually adjusts the output angle θ_(r) from the commanded angle θ_(v)to the estimated angle θ_(est). This gradual adjustment may minimizetransient current demands when transitioning from open loop mode toclosed loop mode, which may prevent disruption of current control(described below) and/or estimation of the estimated angle θ_(est). Thegradual adjustment may therefore improve stability during transitionsand allow for starting the motor 400 more reliably, especially underhigher loads.

The angle/speed determination module 508 may set the output speed ω_(r)equal to the commanded speed ω_(v) when operating in open loop mode. Theangle/speed determination module 508 may set the output speed ω_(r)equal to the estimated speed ω_(est) when operating in closed loop mode.In various implementations, the angle/speed determination module 508 mayimmediately switch the output speed ω_(r) from the commanded speed ω_(v)to the estimated speed ω_(est) when the transition module 503 instructsa transition from open loop mode to closed loop mode.

The transition module 503 may also instruct a change from closed loopmode back to open loop mode. For example only, a transition back to openloop mode may be performed when error conditions, such as a lost rotor,or abnormal operating conditions, are observed. The angle/speeddetermination module 508 may therefore also switch the output speedω_(r) from the estimated speed ω_(est) back to the commanded speedω_(v), and switch the output angle θ_(r) from the estimated angleθ_(est) back to the commanded angle θ_(v). In various implementations,similarly to the transition from open loop mode to closed loop mode,switching the output speed ω_(r) may be performed immediately, whileswitching the output angle θ_(r) may be performed gradually.

In various implementations, additional modes may be supported. Forexample only, three, four, or more modes may be supported. Thetransition module 503 may instruct the angle/speed determination module508 to transition from one of the modes to another. During eachtransition, the angle/speed determination module 508 may switch theoutput speed ω_(r) immediately to a speed corresponding to the selectedmode. Alternatively, the output speed ω_(r) may be ramped toward thespeed of the selected mode. Further, the angle/speed determinationmodule 508 ramps the output angle θ_(r) toward an angle corresponding tothe selected mode. The transition module 503 may instruct theangle/speed determination module 508 to transition from one of the modesto another using a transition signal. For example, the transition signalmay specify a target mode to which the angle/speed determination module508 should transition.

A speed loop control module 510 generates a demanded torque signalcalculated to match the output speed ω_(r) to the commanded speed ω_(v).In various implementations, the speed loop control module 510 may bebypassed in open loop mode. In closed loop mode, the output speed ω_(r)is equal to the estimated speed ω_(est) of the motor 400. Therefore, thespeed loop control module 510 may generate the demanded torque signal inorder to keep the speed of the motor 400 approximately equal to thecommanded speed ω_(v). For example only, when the output speed ω_(r) isless than the commanded speed ω_(v), the speed loop control module 510may increase the demanded torque, and vice versa.

An Idr injection module 512 generates a d-axis current (Idr) demandbased on the DC bus voltage, the demanded torque signal, and thecommanded speed ω_(v). The Idr demand is used by current control,described below, for Idr injection, which may also be referred to asfield weakening or phase advance. In various implementations, the Idrinjection module 512 may adjust the Idr demand based on an out of volts(OOV) signal, described below, and measured current.

A torque mapping module 514 generates a q-axis current (Iqr) demandbased on the demanded torque signal. Torque may also be generated by theIdr demand and therefore, the torque mapping module 514 may determinethe Iqr demand based also on the Idr demand. For example only, thetorque mapping module 514 may implement a maximum current limit. Invarious implementations, the torque mapping module 514 may compare acombination of the Idr demand and the Iqr demand to the maximum currentlimit, and reduce one or both of the demands when the combinationexceeds the maximum current limit. In various implementations, thetorque mapping module 514 may limit only the Iqr demand. For exampleonly, the maximum current limit may be a root mean square limit, such as25 Amps_(rms).

When the torque mapping module 514 is limiting the Iqr demand to meetthe maximum current limit, the torque mapping module 514 may output alimit signal to the speed loop control module 510. When the limit signalis received, the speed loop control module 510 may temporarily suspendincreasing the demanded torque. In addition, the speed loop controlmodule 510 may also temporarily suspend increasing the demanded torquebased on the OOV signal.

For example only, the speed loop control module 510 may attempt to matchthe output speed ω_(r) to a reduced version of the commanded speedω_(v). Alternatively or additionally, the speed loop control module 510may selectively suspend error summing and/or integrating operation thatwould lead to increasing the demanded torque. In other words, when thetorque mapping module indicates, via the limit signal, that the maximumcurrent limit is reached, the speed loop control module 510 may stopincreasing the demanded torque because the present demanded torquealready cannot be achieved within the maximum current limit.

A current control module 516 determines voltage commands Vqr and Vdr, inthe qdr FoR, based on the current demands Iqr and Idr. The voltagecommands Vqr and Vdr may be a q-axis voltage command and a d-axisvoltage command, respectively. In various implementations, the currentcontrol module 516 may determine the voltage commands Vqr and Vdr basedalso on the measured currents. In various implementations, the currentcontrol module 516 may attempt to match the measured currents to the Iqrand Idr demands by adjusting the voltage commands Vqr and Vdr. Invarious implementations, the current control module 516 may also receivethe output speed ω_(r).

An abc to qdr module 520 maps the measured currents I_(a-c) onto the qdrFoR based on the output angle θ_(r). The resulting mapped current may bereferred to as Iqdr, and may include Iqr and Idr components. Themeasured currents used by components of the motor control module 260,such as the current control module 516, may therefore use the Iqdrrepresentation of the measured currents.

A qdr to αβ module 522 may transform the voltage commands Vqr and Vdrfrom the qdr FoR to the αβ FoR, thereby generating a voltage request inthe αβ FoR (hereinafter “voltage request”). The voltage request mayindicate the voltages to be applied to the windings_(a-c). The qdr to αβmodule 522 may perform the transformation based on the output angleθ_(r), and in various implementations, may perform the transformationbased on the output speed ω_(r).

A pulse-width modulation (PWM) module 524 generates duty cycle signalsto control the inverter power module 208 using PWM. For example only,the PWM switching frequency may be approximately 5 kHz or approximately10 kHz. In various implementations, the inverter power module 208 andthe motor 400 have three phases, and the PWM module 524 generates threeduty cycle signals, one for each inverter leg.

In various implementations, each leg of the inverter power module 208includes a pair of complementary switches, and each of the duty cyclesignals is therefore converted into complementary duty cycle signals,one for each of the complementary switches. For example only, referringto FIG. 4 a, the switch 420 and the switch 422 of the first inverter leg410 may be controlled with complementary duty cycles.

In various implementations, to prevent a short circuit condition, whereboth the switches 420 and 422 are on simultaneously, the complementaryduty cycles may be adjusted so that a switch is not turning on at thesame time the other switch is turning off. In other words, the off-timesof the two switches are partially overlapped.

The PWM module 524 determines the duty cycle signals based on the DC busvoltage and the voltage requests from the qdr to αβ module 522. Forexample only, the PWM module 524 may transform the voltage request fromthe αβ FoR to the abc FoR to determine three voltage demands,hereinafter Vr_(a), Vr_(b), and Vr_(c) (collectively Vr_(a-c)),corresponding to the windings_(a-c), respectively.

When the voltage demands can not be met given the present DC busvoltage, the drive controller 132 is defined to be operating in the OOVstate. For example only, a maximum duty cycle may be defined in the PWMmodule 524. If the voltage demands would result in one of the dutycycles being greater than the maximum duty cycle, the drive controller132 is operating in the OOV state.

In various implementations, the maximum duty cycle may be set to be lessthan 100%, such as 96%, 95%, or 92%. The maximum duty cycle limit may beset based on requirements for accurate measurement of the windingcurrents I_(a-c). A corresponding minimum duty cycle limit may also bedefined. For example only, the minimum duty cycle limit may be equal toone minus the maximum duty cycle limit.

In various implementations, the motor 400 may respond not to the windingvoltages themselves, but instead to differences between the windingvoltages. As a simplistic example, applying 50 Volts to a first windingand 150 Volts to a second winding may be equivalent to applying 0 Voltsto the first winding and 100 Volts to the second winding. Therefore,even if one of the voltage demands may exceed an available voltage, thePWM module 524 may shift the voltage demands when generating the dutycycles.

In such implementations, the PWM module 524 may determine that the drivecontroller 132 is in the OOV state when a difference between any two ofthe three voltage demands is greater than the available voltage. Forexample only, the available voltage may be equal to the DC busmultiplied by the maximum duty cycle. In various implementations, thePWM module 524 may shift the duty cycles such that one of the dutycycles is set to zero. Alternatively, the PWM module 524 may shift theduty cycles such that the duty cycles are centered about a middle dutycycle, such as 50%. In various implementations, the PWM module 524 mayshift the duty cycles using one or the other of these approaches,depending on an operating mode. For example only, the PWM module 524 mayshift the duty cycles such that the lowest duty cycle is set to zerowhen the motor 400 is operating at speeds above a predeterminedthreshold.

In the OOV state, the difference between the duty cycles correspondingto the voltage demands is greater than the difference between theminimum and maximum duty cycles. Therefore, when operating in the OOVstate, the PWM module 524 may scale the voltage demands down beforegenerating the duty cycles. Equivalently, the PWM module 524 may scalethe duty cycles. In various implementations, the PWM module 524 mayscale the duty cycles or voltage demands as little as possible, suchthat one of the duty cycles is set to the minimum duty cycle, and one ofthe duty cycles is set to the maximum duty cycle.

The scaling factor is an indication of how far OOV the drive controller132 currently is. The scaling factor may be referred to as OOVmagnitude, and may be included in the OOV signal. In the OOV state, thePWM module 524 sets an OOV flag to a first value, such as 1. When not inthe OOV state, the PWM module 524 sets the OOV flag to a second value,such as 0. The OOV flag may be included in the OOV signal.

An OOV amount may be determined based on the OOV flag. For example only,the OOV amount may indicate how often the drive controller 132 isoperating OOV. For purposes of illustration only, the inverter powermodule 208 may define an operating region shaped like a hexagon. Thevoltage demands may be thought of as circles within the hexagon. If thecircles are centered within the hexagon, as the circles expand, theywill touch the sides of the hexagon. When the circles expand beyond thehexagon, the circles become more and more clipped at each face of thehexagon. Clipping may correspond to the OOV state. As a result, theproportion of time that the voltage demands are clipping (producing theOOV state) indicates how far OOV the driver controller 132 is.

The OOV amount may represent a portion of the time that the drivecontroller 132 is spending in the OOV state. The OOV amount may bedetermined by applying a filter, such as a digital low-pass filter, tothe OOV flag. For example only, the OOV amount may be determined byapplying a moving average to the OOV flag. When the OOV flag assumesvalues of 0 or 1, the OOV amount will then range between 0 and 1,inclusive. When multiplied by 100, the OOV amount is the percentage oftime the drive controller 132 is spending in the OOV state.

The motor control module 260 may use multiple approaches to minimize OOVoperation, or to maintain OOV operation below a predetermined threshold.In various implementations, the Idr injection module 512 may use the OOVamount in determining how to adjust the Idr demand. The speed loopcontrol module 510 may also use the OOV amount to determine when tosuspend increases in the demanded torque. The current control module 516may suspend increases to one or both of the Vqr and Vdr commands basedon the OOV flag.

Referring now to FIG. 6, an example implementation of the angle/speeddetermination module 508 includes a subtraction module 602, an errorreducing module 604, a summing module 606, a first multiplexing module608, and a second multiplexing module 612. During open loop mode, thetransition signal from the transition module 503 instructs the firstmultiplexing module 608 to output the commanded angle θ_(v) as theoutput angle θ_(r). When transitioning from open loop mode to closedloop mode, the transition signal instructs the first multiplexing module608 to output a sum from the summing module 606 as the output angleθ_(r). This sum will eventually be equal to the estimated angle θ_(est).

However, at the time of the transition, the commanded angle θ_(v) andthe estimated angle θ_(est) may not be equal. In order to avoiddiscontinuities in the output angle θ_(r) at the time of the transition,the sum from the summing module 606 is controlled to be equal to thecommanded angle θ_(v). This may be done by calculating the difference(θ_(error)) between the commanded angle θ_(v) and the estimated angleθ_(est), and adding the angle error θ_(error) to the estimated angleθ_(est). The estimated angle θ_(est) that is added cancels with theestimated angle θ_(est) that was subtracted, and the result is still thecommanded angle θ_(v) at the time of the transition. The subtractionmodule 602 generates the angle error θ_(est).

The error reducing module 604 stores the value of angle error θ_(error)at the time of the transition and, over time, reduces the absolute valueof the stored value to zero. The stored value is output from the errorreducing module 604 as θ_(s). When the stored value reaches zero, thesum from the summing module 606 will be equal to the estimated angleθ_(est), and the transition is complete.

In various implementations, the error reducing module 604 may decrementthe magnitude of the stored value by predetermined increments atpredetermined intervals until the stored value reaches zero. In otherwords, the error reducing module 604 decreases the magnitude of θ_(s)when decrementing θ_(s), regardless of the sign of θ_(s). For example,the error reducing module 604 may subtract the predetermined incrementfrom θ_(s) when θ_(s) is a positive value. The error reducing module 604may add the predetermined increment to θ_(s) when θ_(s) is a negativevalue. For example only, the error reducing module 604 may decrement themagnitude of θ_(s) by 0.5 degrees at 100 μs intervals until θ_(s)reaches zero.

During open loop mode, the transition signal instructs the secondmultiplexing module 612 to output ω_(v) as ω_(r). When transitioningfrom open loop mode to closed loop mode, the transition signal instructsthe second multiplexing module 612 to output ω_(est) as ω_(r). In normaloperation, ω_(est) and ω_(v) will be equal, and therefore switchingdirectly from one to the other will not result in an abrupt change inω_(r).

Referring now to FIG. 7, an example transition from open loop mode toclosed loop mode is graphically illustrated. The thin dashed line tracksthe commanded angle θ_(v) used in open loop mode. The thin solid linetracks the estimated angle θ_(est) used in closed loop mode. The boldline is the output of the angle/speed determination module 508, theoutput angle θ_(r). The output angle θ_(r) follows the commanded angleθ_(v) until the beginning of the transition from open loop mode toclosed loop mode. The output angle θ_(r) then ramps toward the estimatedangle θ_(est). In actuality, as soon as the start of the transitionoccurs, the output angle θ_(r) is following the estimated angle θ_(est).However, the output angle θ_(r) is following the estimated angle θ_(est)plus an offset (θ_(s)). That offset is reduced over the course of thetransition. When the offset reaches zero, the output angle θ_(r) followsthe estimated angle θ_(est) for the remainder of FIG. 7.

While the merging system is described as controlling a transition fromthe commanded angle θ_(v) in open loop mode to the estimated angleθ_(est) in closed loop mode, the merging system may be generallyapplicable to transitioning between any two motor control angles. Forexample, when a first sensorless control system controls based on afirst angle (θ₁) and a second sensorless control system controls basedon a second angle (θ₂), the merging system may control a transition fromθ₁ to θ₂ when control transitions from the first to the secondsensorless control system. Alternatively, the merging system may controla transition from θ₂ to θ₁ when control switches from the secondsensorless control system to the first sensorless control system.

The first sensorless control system may be a system that controls therotor in a first speed range, while the second sensorless control systemmay be a system that controls the rotor in a second speed range.Accordingly, the merging system may transition between θ₁ and θ₂ basedon the speed of the rotor. In some implementations, the merging systemmay control a transition from open loop mode to the first sensorlesscontrol system, then control transitions between the first sensorlesscontrol system and the second sensorless control system based on thespeed of the rotor. The merging system may control transitions from anyone of N modes to another of N modes, where N is an integer greater thanor equal to 2. For example only, N may be equal to 2, 3, 4, or more.

Referring now to FIG. 8, a method for transitioning from open loop modeto closed loop mode begins in 802. In 802, control operates the motor400 in open loop mode based on the commanded angle θ_(v) and ω_(v). In804, control determines whether to transition from open loop mode toclosed loop mode. If true, control proceeds to 806; otherwise, controlremains in 804. In 806, control calculates the angle error θ_(error)based on a difference between the commanded angle θ_(v) and theestimated angle θ_(est). In 808, control stores the angle errorθ_(error) as θ_(s).

In 810, control operates the motor 400 based on ω_(est) and the sum ofθ_(est) and θ_(s). Because processing is not instantaneous, 810 istechnically performed after the transition from open loop to closed loophas been instructed by 804. However, the delay may be negligible. In812, control determines whether θ_(s) is equal to zero. If false,control proceeds to 814. If true, control proceeds to 818. In 814,control waits for a predetermined interval. In 816, control decrementsthe magnitude of θ_(s) by a predetermined amount and returns to 812. In818, control operates the motor 400 based on ω_(est) and the estimatedangle θ_(est). Control remains in 818. However, if an error occurs,control may return (not shown) to 802. Operating in open loop mode mayallow recovery from error conditions.

The broad teachings of the disclosure can be implemented in a variety offorms. Therefore, while this disclosure includes particular examples,the true scope of the disclosure should not be so limited since othermodifications will become apparent to the skilled practitioner upon astudy of the drawings, the specification, and the following claims.

1. A system comprising: a control module that controls a motor based ona first rotor angle; an angle determination module that generates thefirst rotor angle; an estimator module that determines an estimatedrotor angle of the motor; and a transition module that generates atransition signal in response to convergence of the estimator module,wherein: the angle determination module initially generates the firstrotor angle based on an open loop angle, in response to the transitionsignal, the angle determination module switches to generating the firstrotor angle based on the estimated rotor angle and an offset value, andthe offset value is based on a difference between the estimated rotorangle and the open loop angle at the time when the transition signal isgenerated.
 2. The system of claim 1 wherein, over a time periodsubsequent to the time when the transition signal is generated, theangle determination module reduces a magnitude of the offset to zero. 3.The system of claim 2 wherein the angle determination module reduces themagnitude of the offset, at periodic intervals, by a predeterminedamount.
 4. The system of claim 1 wherein the angle determination modulegenerates the first rotor angle based on the estimated rotor angle andthe offset value by summing the estimated rotor angle and the offsetvalue.
 5. The system of claim 1 wherein the transition module judges theconvergence of the estimator module based on flux estimates generated bythe estimator module.
 6. The system of claim 1 further comprising acommanded angle generation module that generates the open loop anglebased on a commanded speed.
 7. The system of claim 6 wherein thecommanded angle generation module generates the open loop angle byintegrating the commanded speed.
 8. The system of claim 1 wherein theestimator module determines the estimated rotor angle based on measuredparameters of the motor, wherein the measured parameters include atleast one of measured currents and measured voltages.
 9. The system ofclaim 1 wherein the estimator module determines an estimated speed ofthe motor, and wherein the control module controls the switching basedon the first rotor angle and the estimated speed in response to thetransition signal.
 10. The system of claim 9 wherein the transitionmodule also generates the transition signal in response to (i) theestimated speed being greater than a predetermined speed, and (ii) themotor having run for longer than a predetermined period of time.
 11. Amethod of operating a motor, the method comprising: controlling themotor based on a first rotor angle; using an estimator, determining anestimated rotor angle of the motor; generating a transition signal inresponse to convergence of the estimator; initially generating the firstrotor angle based on an open loop angle; and in response to thetransition signal, switching to generating the first rotor angle basedon the estimated rotor angle and an offset value, wherein the offsetvalue is based on a difference between the estimated rotor angle and theopen loop angle at the time when the transition signal is generated. 12.The method of claim 11 further comprising, over a time period subsequentto the time when the transition signal is generated, reducing amagnitude of the offset to zero.
 13. The method of claim 12 furthercomprising reducing the magnitude of the offset, at periodic intervals,by a predetermined amount.
 14. The method of claim 11 further comprisinggenerating the first rotor angle based on the estimated rotor angle andthe offset value by summing the estimated rotor angle and the offsetvalue.
 15. The method of claim 11 further comprising judging theconvergence of the estimator based on flux estimates generated by theestimator.
 16. The method of claim 11 further comprising generating theopen loop angle based on a commanded speed.
 17. The method of claim 16further comprising generating the open loop angle by integrating thecommanded speed.
 18. The method of claim 11 further comprisingdetermining the estimated rotor angle based on measured parameters ofthe motor, wherein the measured parameters include at least one ofmeasured currents and measured voltages.
 19. The method of claim 11further comprising: determining an estimated speed of the motor; and inresponse to the transition signal, controlling the switching based onthe first rotor angle and the estimated speed.
 20. The method of claim19 further comprising: generating the transition signal in response tothe estimated speed being greater than a predetermined speed; andgenerating the transition signal in response to the motor having run forlonger than a predetermined period of time.